1 using System;
2 using
System.Data;
3 using
System.Configuration;
4 using
System.Collections;
5 using
System.Web;
6 using
System.Web.Security;
7 using
System.Web.UI;
8 using
System.Web.UI.WebControls;
9 using
System.Web.UI.WebControls.WebParts;
10 using
System.Web.UI.HtmlControls;
11 using
System.Data.OleDb;
12 public
partial class Default3 : System.Web.UI.Page
13 {
14     HyperLink hplThongTin;
15     
//OleDbConnection con;
16     
17     
protected void Page_Load(object sender, EventArgs e)
18     {
19         
if (!IsPostBack)
20         {
21             
22             Label8.Text += Session[
"TuKhoa"];
23             
if (Session["KQTimKiem"] != null)
24             {
25                 DataTable dt = (DataTable)Session[
"KQTimKiem"];
26                 
27                 GridView1.DataSource = dt;
28                 GridView1.DataBind();
29                 
foreach (GridViewRow gr in GridView1.Rows)
30                 {
31                     hplThongTin = (HyperLink)gr.FindControl(
"hplThongTin");
32                     hplThongTin.NavigateUrl =
"~/chitiet.aspx?tensp=" + gr.Cells[1].Text ;
33                 }
34                 
//Download source code tại Sharecode.vn
35             }
36         }
37         
38   
39    }
40 }



Quản lý website giới thiệu và bán điện thoại di động ASP.net 19.270 lượt xem

Gõ tìm kiếm nhanh...